home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Entertainment / MacMud / Mud 4.0 / func_spec.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-22  |  5.6 KB  |  202 lines  |  [TEXT/MPS ]

  1. #include "config.h"
  2.  
  3. #define MAPPINGS
  4.  
  5. /*
  6.  * This file specifies types and arguments for efuns.
  7.  * An argument can have two different types with the syntax 'type1 | type2'.
  8.  * An argument is marked as optional if it also takes the type 'void'.
  9.  *
  10.  * Look at the end for the list of functions that are optionally available.
  11.  * If you don't want them, simply comment out them. All other functions must
  12.  * remain defined.
  13.  */
  14.  
  15. string *regexp(string *, string);
  16. void add_action(string, void|string, void|int);
  17. void add_verb(string);
  18. void add_worth(int, void|object);
  19. void add_xverb(string);
  20. object *all_inventory(object default: F_THIS_OBJECT);
  21. mixed *allocate(int);
  22. void break_point();
  23. unknown call_other(object|string, string, ...);
  24. void call_out(string, int, ...);
  25. mixed *call_out_info();
  26. string capitalize(string);
  27. int cat(string, void|int, void|int);
  28. int cindent(string);
  29. string clear_bit(string, int);
  30. object clone_object(string);
  31. int command(string, void|object);
  32. string crypt(string, string|int);    /* An int as second argument ? */
  33. string ctime(int);
  34. mixed debug_info(int, mixed|void, ...);
  35. object *deep_inventory(object);
  36. void destruct(object);
  37. void disable_commands();
  38. void ed(void|string, void|string);
  39. void enable_commands();
  40. object environment(void|object);
  41. int exec(object, object);
  42. string *explode(string, string);
  43. string extract(string, void|int, void|int);
  44. string file_name(object default: F_THIS_OBJECT);
  45. int file_size(string);
  46. mixed *filter_array(mixed *, string, object|string, void|mixed);
  47. int find_call_out(string);
  48. object find_living(string);
  49. object find_object(string);
  50. object find_player(string);
  51. string function_exists(string, object default: F_THIS_OBJECT);
  52. string implode(string *, string);
  53. void input_to(string, void|int);
  54. int interactive(object default: F_THIS_OBJECT);
  55. int intp(mixed);
  56. int living(object);
  57. void localcmd();
  58. void log_file(string, string);
  59. string lower_case(string);
  60. string *get_dir(string);
  61. mixed *map_array(mixed *, string, object|string, void|mixed);
  62. object master_object();
  63. int member_array(mixed, mixed *);
  64. int mkdir(string);
  65. void move_object(object|string, object|string);
  66. void notify_fail(string);
  67. int objectp(mixed);
  68. int pointerp(mixed);
  69. object present(object|string, void|object);
  70. object previous_object();
  71. string process_string(string);
  72. string query_host_name();
  73. int query_idle(object);
  74. int query_heart_beat(object);
  75. string query_ip_name(void|object);
  76. string query_ip_number(void|object);
  77. string query_load_average();
  78. object query_snoop(object);
  79. string query_verb();
  80. void printf(string, ...);
  81. int random(int);
  82. string read_bytes(string, int, int);
  83. string read_file(string, void|int, void|int);
  84. int remove_call_out(string);
  85. int restore_object(string);
  86. int rm(string);
  87. void rmdir(string);
  88.  
  89. void save_object(string);
  90. void say(string|mixed *, void|object|object *);
  91. string set_bit(string, int);
  92. int set_heart_beat(int);
  93. int set_light(int);
  94. void set_living_name(string);
  95. object shadow(object, int);
  96. void shout(string);
  97. void shutdown();
  98. int sizeof(mixed *);
  99. object snoop(void|object, void|object);
  100. mixed *sort_array(mixed *,string,object|string default: F_THIS_OBJECT);
  101. string sprintf(string, ...);
  102. int stringp(mixed);
  103. int strlen(string);
  104. void swap(object);        /* Only used for debugging */
  105. #ifdef NLHACK
  106. int tail(string|int,string|void);
  107. #else
  108. void tail(string);
  109. #endif
  110.  
  111. void tell_object(object, string);
  112. void tell_room(object|string, string, void|object *);
  113. int test_bit(string, int);
  114. object this_interactive();
  115. object this_object();
  116. object this_player();
  117. void throw(mixed);
  118. int time();
  119. int trace(int);
  120. string traceprefix(string|int);
  121. mixed *unique_array(mixed *, string, void|mixed);
  122. object *users();
  123. string version();
  124. void wizlist(void|string);
  125. void write(mixed);
  126. int write_bytes(string, int, string);
  127. int write_file(string, string);
  128. string *inherit_list(object default: F_THIS_OBJECT);
  129.  
  130. /*
  131.  * List of functions only used in compatibility mode.
  132.  */
  133. #ifdef COMPAT_MODE
  134. string creator(object);
  135. int transfer(object, object|string);
  136. string create_wizard(string, void|string);
  137. #endif
  138.  
  139. /*
  140.  * List of functions only used in native mode.
  141.  */
  142. #ifndef COMPAT_MODE
  143. int rename(string, string);
  144. int export_uid(object);
  145. string geteuid(object default: F_THIS_OBJECT);
  146. string getuid(object default: F_THIS_OBJECT);
  147. int seteuid(string|int);
  148. #endif
  149.  
  150. #ifdef MALLOC_malloc
  151. /*
  152.  * This one is needed if you use the old malloc.c, which is no longer
  153.  * supplied. It is called from church.c in the original 2.4.5 mudlib. This
  154.  * call is not needed if malloc.c is not used, and should be removed.
  155.  */
  156. void combine_free_list();
  157. #endif
  158.  
  159. /*
  160.  *
  161.  * The following functions are optional. Comment out the ones not wanted.
  162.  * Beware that some may be used in mudlib 2.4.5.
  163.  *
  164.  */
  165. object first_inventory(object|string default: F_THIS_OBJECT);
  166. object next_inventory(object default: F_THIS_OBJECT);
  167.  
  168. #ifdef NLHACK
  169. int copy_file(string, string);
  170. string *explode_file(string);
  171. int get_mem_usage();
  172. mixed get_var(string);
  173. string *ls(string, void|string);
  174. int rename_file(string, string);
  175. int set_var(string, mixed);
  176. int sqrt(int);
  177. void grep(string, string *);
  178. void people();
  179. int planet_shout(object, string);
  180. void set_hard_invis(object, int);
  181. void set_see_hinvis(object, int);
  182. #endif
  183.  
  184. #ifdef MAPPINGS
  185. mapping filter_mapping(mapping, string, object|string, void|mixed);
  186. mapping m_delete(mapping, mixed);
  187. mixed *m_indices(mapping);
  188. int m_sizeof(mapping);
  189. mixed *m_values(mapping);
  190. mapping map_mapping(mapping, string, object|string, void|mixed);
  191. int mappingp(mixed);
  192. mapping mkmapping(mixed *, mixed *);
  193. #else
  194. /*
  195.  * Thrown out in favor of mappings
  196.  */
  197. mixed assoc(mixed, mixed *, mixed|void, mixed|void);
  198. mixed insert_alist(mixed, mixed, ...);
  199. mixed *intersect_alist(mixed *,mixed *);
  200. mixed *order_alist(mixed *, void|mixed *, ...);
  201. #endif
  202.